﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace static的使用
{
    class Person
    {
        private string name;
        static string b;
        //非静态方法
        public void Play()
        {
            string a = "";
        }
        //静态方法
        public static void Sleep()
        {
        }
    }

    static class Animal
    {
        static string name;
        static int age;

        public static void Sleep() { }
        public static void Eat() {     }
    internal class Program
    {
        static void Main(string[] args)
        {
            //调用静态方法
            Person.Sleep();

            //调用非静态方法
            Person person = new Person();
            person.Play();
        }
    }
}
